package com.huawei.appgallery.packagemanager.impl.uninstall.control;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.huawei.secure.android.common.intent.SafeIntent;
import o.cnu;
import o.cpf;
import o.cpq;
import o.cpu;

public class UninstallResultReceiver extends BroadcastReceiver {
    public void onReceive(Context context, Intent intent) {
        int i = 1;
        SafeIntent safeIntent = new SafeIntent(intent);
        String stringExtra = safeIntent.getStringExtra("package_task_result_receiver_packagename");
        if (stringExtra == null) {
            cnu.ˏ.ˏ("UninstallResultReceiver", "error,packageName is null");
            return;
        }
        cnu.ˏ.ˋ("UninstallResultReceiver", "uninstall result:" + stringExtra);
        int intExtra = safeIntent.getIntExtra("android.content.pm.extra.STATUS", 1);
        long longExtra = safeIntent.getLongExtra("package_task_result_receiver_taskid", 0);
        String stringExtra2 = safeIntent.getStringExtra("android.content.pm.extra.STATUS_MESSAGE");
        cnu.ˏ.ˋ("UninstallResultReceiver", " package uninstall callback:packageName:" + stringExtra + ",status:" + intExtra + ",statusMessage:" + stringExtra2);
        cpf.ˋ(context.getApplicationContext()).removeMessages(stringExtra.hashCode() + 20170710);
        if (intExtra != 0) {
            i = cpq.ˋ(stringExtra2);
        }
        cpu.ॱ(context, stringExtra, i, longExtra, 3);
    }
}
